<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>全网VIP视频解析-岩兔站</title>
    
    <!-- Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
	    .header{
		    margin-top:10%;
	    }
	    .main{
		    padding:10px 15%;
	    }
	    .footer{
		    padding:10px 15%;
	    }

    </style>
<body>
	<div class="container">
	    <div class="header h1 text-center">
		    <h1>全网VIP视频解析-岩兔站</h1>
		    <small>选取解析API并输入视频地址即可免VIP播放</small>
	    </div>
        <hr />

        <iframe id='iframe' src='http://api.quanminjiexi.com/jx/?url=https://v.qq.com/x/cover/1o29ui77e85grdr.html?ptag=douban.movie' 
                width='100%' height='600' frameborder='0' allow='autoplay; encrypted-media' allowfullscreen></iframe>
        
	    <hr />
			<div class="main">
				<form class="form-horizontal" method="post">
				  <div class="form-group">
					<label for="api" class="col-sm-2 control-label">API地址</label>
					<div class="col-sm-10">
					  <select id="api" name="api" class="form-control"></select>
					</div>
				  </div>
				  <div class="form-group">
					<label for="url" class="col-sm-2 control-label">视频地址</label>
					<div class="col-sm-10">
						<select id="url" name="url" class="form-control"></select>
					  <!--input type="url" class="form-control" id="url" name="url" placeholder="视频地址"
							 value="https://v.qq.com/x/cover/zatx0zuk94d9aru.html?ptag=douban.movie"-->
					</div>
				  </div>
				  <div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
					  <button type="button" id="play" class="btn btn-primary">解 析</button>
					</div>
				  </div>
				</form>
			</div>
        <hr />
			
	    <div class="main" style="display:none;">
			<h4>如播放地址失效，可重新设置API列表。<a href="https://bak.yantuz.cn:8000/466.html" target="_blank">API获取</a>/<a href="javascript:setDefault();">恢复默认</a></h4>
			<div class="form-horizontal">
				<div class="form-group">
			    <label for="url" class="col-sm-2 control-label">API列表</label>
			    <div class="col-sm-10">
			        <textarea rows="10" id="apiList" class="form-control">

						http://api.xiaomil.com/a/index.php?url=

						https://api.pangujiexi.com/player.php?url=

						http://at520.cn/jx/?url=

						http://api.nobij.top/jx/?url=

						http://player.jidiaose.com/supapi/iframe.php?v=

						http://api.91exp.com/svip/?url=

						https://jx.618g.com/?url=

						http://api.bbbbbb.me/ipsign/player.php?v=

						http://17kyun.com/api.php?url=

					</textarea>
			    </div>
			  </div>
	    	</div>
	    </div>
	    <div class="footer text-center">
		    <p>技术支持：<a href="https://yantuz.cn/" target="_blank">岩兔站</a></p>
	    </div>
	</div>
    
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <script>
	    function setApi(){
		    $("#api").children().remove();
			var apilist = $("#apiList").val().split(/\r?\n/);
			for(var i=0;i<apilist.length;i++){
				if (apilist[i].trim().length>0){
					$("#api").append("<option>"+apilist[i].trim()+"</option>");
				}
			}
	    }
		$("#apiList").blur(function(){
			setApi();
			$.cookie("apiList",$("#apiList").val());
		});
		$("#play").click(function(b=true){
			$api = $("#api").val();
			$url = $("#url").val();
			if($url == "" || $url == null || !/^http.*$/.test($url)){
				if (b) alert('视频地址不正确！');
				return;
			}
			if($url == "" || $url == null || !/^http.*=$/.test($api)){
				if (b) alert('无效API！');
				return;
			}
			document.getElementById("iframe").src = ($api+$url);
		});
	    function init(){
		    var ckapi = $.cookie("apiList");
		    if(ckapi && ckapi != ""){
			    $("#apiList").val(ckapi);
		    }
		    setApi();
			movieid = getQueryVariable("movieid");
			if (movieid != null){
				getPlayAddress(movieid)
			}
			getParsing()
		}
	    init();
        function setDefault(){
            $.cookie("apiList","");
            window.location.reload();
        }
        function setUrl(url){
            document.getElementById("reportFrame").src = url;
        }
		function getQueryVariable(variable)
		{
			var query = window.location.search.substring(1);
			var vars = query.split("&");
			for (var i=0;i<vars.length;i++) {
				var pair = vars[i].split("=");
				if(pair[0] == variable){return pair[1];}
			}
			return null;
		}
		function getPlayAddress(movieid) {
        	console.log(movieid)
			$.ajax({
				url: '../playaddress/list',
				method:'GET',
				dataType: 'json',
				data: {
					'movie_id':movieid
				},
				success: function(res){
					data = res.page.list
					console.log(data)
					setdata(data,"url")

				},
				error: function(){

				}
			})
		}
		function getParsing() {
			$.ajax({
				url: '../parsing/list',
				method:'GET',
				dataType: 'json',
				data: {

				},
				success: function(res){
					data = res.page.list
					console.log(data)
					setdata(data,"api")

				},
				error: function(){

				}
			})
		}
		function setdata(apilist,id){
			$("#"+id).children().remove();
			for(var i=0;i<apilist.length;i++){
				$("#"+id).append("<option value="+apilist[i].url+">"+apilist[i].name+"</option>");
			}
			$("#play").click(false)
		}

    </script>
    <script>
    var _hmt = _hmt || [];
        (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?65e1c6689693082cffb3b7e1f2d8027f";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
        })();
    </script>
</body>
</html>